package com.fmyexample.v2mcsecuritybootredis.security;

import com.fmy.mcsecurity.login.service.McUserDetails;
import org.springframework.security.core.GrantedAuthority;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Mr.fmy
 * @version 1.0.0
 * @ClassName CuUserDetails
 * @Description TODO 自定义 UserDetails
 * @createTime 2020/4/15 11:46
 */
public class CuUserDetails implements McUserDetails {

    @Override
    public String userId() {
        return "admin";
    }


    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return new ArrayList<>();
    }

    @Override
    public String getPassword() {
        return "123456";
    }

    @Override
    public String getUsername() {
        return "admin";
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
